package org.szrcb.temu.SalesManage.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.szrcb.temu.SalesManage.DTO.AfterSalesDTO;
import org.szrcb.temu.SalesManage.dao.WarehouseDao;
import org.szrcb.temu.SalesManage.pojo.Warehouse;
import org.szrcb.temu.SalesManage.service.WarehouseService;

import java.util.List;

@Service
public class WarehouseServiceImpl implements WarehouseService {
    @Autowired
    private WarehouseDao warehouseDao;

    @Override
    public List<Warehouse> queryWarehouse(String mallId, String productName, String skuExtCode, String productSkuId) {
        return warehouseDao.queryWarehouse(mallId,productName,skuExtCode,productSkuId);
    }

    @Override
    public int checkSkuCodeExist(String mallId, String skuExtCode) {
        return warehouseDao.checkSkuCodeExist(mallId,skuExtCode);
    }

    @Override
    public void updateWarehouse(Warehouse warehouse) {
        warehouseDao.updateWarehouse(warehouse);
    }

    @Override
    public void saveWarehouse(Warehouse warehouse) {
        warehouseDao.saveWarehouse(warehouse);
    }

    @Override
    public void updateBuyingPriceBySkuExtCode(String skuExtCode, String buyingPrice) {
        warehouseDao.updateBuyingPriceBySkuExtCode(skuExtCode,buyingPrice);
    }

    @Override
    public List<Long> queryProductSkuIds(String mallId) {
        return warehouseDao.queryProductSkuIds(mallId);
    }

    @Override
    public List<Warehouse>  queryMallListByProductId(List<String> productSkuIds) {
        return warehouseDao.queryMallListByProductId(productSkuIds);
    }
}
